package com.fy.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import com.fy.util.TuringUtil;

@WebServlet("/reply")
public class ReplyServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException,
	IOException {
		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		try {
			String info = request.getParameter("info");
			String reply = TuringUtil.getResult(info);
			response.getWriter().print(reply);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}